//
//  TempCity.m
//  作业7
//
//  Created by dllo on 16/7/12.
//  Copyright © 2016年 dllo. All rights reserved.
//

#import "TempCity.h"

@implementation TempCity
- (void)dealloc
{
    [_name release];
    [_number release];
    [super dealloc];
}
- (instancetype)initWithName:(NSString *)name
                      number:(NSString *)number {
    if (self = [super init]) {
        _name = [name copy];
        _number = [number copy];
    }
    return self;
}
- (NSString *)description {
    return [NSString stringWithFormat:@"%@ %@",_name,_number];
}
+ (instancetype)tempCityWithName:(NSString *)name
                          number:(NSString *)number {
    return [[[TempCity alloc] initWithName:name number:number]autorelease];
}
@end
